package lol.clann.bukkit.pluginboot.model.rawmessage;

/**
 * @author pyz
 * @date 2018/8/18 上午11:04
 */
public class ClickEvent {

    /**
     * Runs a command.
     *
     * @param command The command to run
     * @return The {@link MessageEvent}
     */
    public static MessageEvent runCommand(String command) {
        return new MessageEvent("run_command", command);
    }

    /**
     * Suggests a command by putting inserting it in chat.
     *
     * @param command The command to suggest
     * @return The {@link MessageEvent}
     */
    public static MessageEvent suggestCommand(String command) {
        return new MessageEvent("suggest_command", command);
    }

    /**
     * Requires web links to be enabled on the client.
     *
     * @param url The url to open
     * @return The {@link MessageEvent}
     */
    public static MessageEvent openURL(String url) {
        return new MessageEvent("open_url", url);
    }

}
